{% extends "fronted/base.html" %}

{% block main %}
    <div class="box box-primary">
        <div class="box-header with-border"><h3 class="box-title">评测记录</h3></div>
        <div class="box-body table-responsive no-padding">
            <table class="table table-hover">
                <tbody>
                    <tr>
                        <td>#</td>
                        <td>提交者</td>
                        <td>题目id</td>
                        <td>语言</td>
                        <td>状态</td>
                        <td>分数</td>
                    </tr>
                    {% for record in private.records %}
                        <tr>
                            <td>{{ record.id }}</td>
                            <td>{{ record.user }}</td>
                            <td><a href="{{ url_for("fronted.problem_show", problem_id = record.prob_id) }}">{{ record.prob_id }}</a></td>
                            <td>{{ record.language }}</td>
                            <td><a href="{{ url_for("fronted.record_show", record_id = record.id) }}">{{ record.status }}</a></td>
                            <td>{{ record.score }}</td>
                        </tr>
                    {% endfor %}
                </tbody>
            </table>
        </div>
        <div class="box-footer clearfix">
              <ul class="pagination pagination-sm no-margin">
                {% if private.last_button_url %}
                    <li><a href="{{ private.last_button_url }}">←上页</a></li>
                {% endif %}
                {% if private.next_button_url %}
                    <li><a href="{{ private.next_button_url }}">下页→</a></li>
                {% endif %}
              </ul>
        </div>
    </div>
{% endblock%}